package com.ido.babyshow.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.ido.babyshow.common.GlobalConstant;
import com.ido.babyshow.dao.IPhotoDao;
import com.ido.babyshow.model.Photo;
import com.ido.babyshow.service.IPhotoService;

@Service
public class PhotoService implements IPhotoService
{
    @Resource
    private IPhotoDao photoDao;    
  
    public void setPhotoDao(IPhotoDao photoDao)
    {
        this.photoDao = photoDao;
    }


    @Override
    public List<Photo> selForShow(int secCatalogId)
    {
        Map paraMap = new HashMap();
        paraMap.put("secCatalogId", secCatalogId);
        paraMap.put("limit", GlobalConstant.PHOTO_HOME_SIZE);
        return photoDao.<Photo>selectList(paraMap);
        
    }
    
  
}
